#ifndef _FS_EPOLL
#define _FS_EPOLL

#include <sys/epoll.h>

typedef struct epoll {
    struct epoll_event *events;
    int len;
    int fd;
    int timeout;    // ms
} Ep;

Ep *ep_create (int len);
void ep_close (Ep *ep);

int ep_add (Ep *ep, int sock, uint32_t events);
int ep_mod (Ep *ep, int sock, uint32_t events);

int ep_wait (Ep *ep);

#endif
